package com.itfreer.gis.map.dictionary;

import com.itfreer.form.api.dictionary.DictionaryEntity;
import com.itfreer.form.api.dictionary.LocalDictionaryBase;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * 数据资源类型
 */
@Component
public class DataSourceType extends LocalDictionaryBase {

    @Override
    public String getDictionaryName() {
        return "d_data_source_type";
    }

    @Override
    protected List<DictionaryEntity> getDictionarys() {
        List<DictionaryEntity> list = new ArrayList<DictionaryEntity>();
        DictionaryEntity item = new DictionaryEntity();
        item.setId("vector");
        item.setCode("vector");
        item.setDisplay("vector");
        item.setOrder(1);
        list.add(item);

        item = new DictionaryEntity();
        item.setId("raster");
        item.setCode("raster");
        item.setDisplay("raster");
        item.setOrder(2);
        list.add(item);

        item = new DictionaryEntity();
        item.setId("raster-dem");
        item.setCode("raster-dem");
        item.setDisplay("raster-dem");
        item.setOrder(3);
        list.add(item);

        item = new DictionaryEntity();
        item.setId("geojson");
        item.setCode("geojson");
        item.setDisplay("geojson");
        item.setOrder(5);
        list.add(item);

        item = new DictionaryEntity();
        item.setId("image");
        item.setCode("image");
        item.setDisplay("image");
        item.setOrder(5);
        list.add(item);

        item = new DictionaryEntity();
        item.setId("video");
        item.setCode("video");
        item.setDisplay("video");
        item.setOrder(6);
        list.add(item);

        return list;
    }
}
